package vip.george.proxybeantest.service.impl;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import vip.george.proxybeantest.service.AsyncService;




/**
 * 有父类的 Service
 * 另外使用了 @Async
 * 会被 jdk 代理
 */
@Service
public class AsyncServiceImpl implements AsyncService {


    @Override
    @Async
    public void doInTransaction() {
//        System.out.println("Executing in Async...");
//
//        try {
//            Thread.sleep(5000);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
//        System.out.println("Finished Async...");
    }
}

